import Joi from '@hapi/joi';


export const indexRule = {
    query: {
        name: Joi.string().allow('')
    },
};


export const createRule = {
    body: {
        access_token: Joi.string()
            .trim()
            .required(),
        async: Joi.number()
            .required(),
        typeId: Joi.number()
            .required(),
        text: Joi.string()
            .trim()
            .required(),
        seq_len: Joi.number()
            .required(),
        task_prompt: Joi.string()
            .required(),
        penalty_score: Joi.number()
            .required(),
        dataset_prompt: Joi.string()
            .required(),
        is_unidirectional: Joi.number()
            .required(),
        min_dec_len: Joi.number()
            .required(),
        min_dec_penalty_text: Joi.string()
            .required(),
        mask_type: Joi.string()
            .required(),
        topp: Joi.number()
            .required(),
    },
};
